<template>
	<view>
		<!-- @click="NAVPAGE('/pages/content/privateChat/privateChat')" -->
		<view class="messageType" v-for="(item,index) in list" :key="index" @click="NAVPAGE(`/pages/home/opusDetail/opusDetail?id=${item.dynamic.id}`)">
			<view class="headImg">
			      <image :src="item.user.headimg" mode="scaleToFill"></image>
			</view>
			<view class="name">
				<view class="type">
					<view style="font-size: 30rpx;">{{item.user.nickname}}</view>
					<view>{{item.create_at}}</view>
				</view>
				<view class="types">
					<view>{{item.content}}</view>
				</view>
			</view>
		</view>
		<view class=""  style="margin-top: 200rpx;">
		<u-empty  v-if="list.length == 0" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
				</u-empty>
				</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
                 list:[]
			}
		},
		onLoad() {
			this.GetLikes()
		},
		methods: {
			//动态收藏
			Clear(){
				this.$api.CollectionNotice().then(res=>{})
			},
			GetLikes(){
				this.$api.Dynamic().then(res=>{
					 this.list = res.data.list
					 this.Clear()
				})
			}
		}
	}
</script>

<style  lang="scss">
	page{
		background-color: #f7f7f7;
	}
	.messageType {
		margin: 20rpx;
		display: flex;
		padding: 30rpx;
		border-radius: 10rpx;
		background-color: #ffffff;

		.headImg {
			width: 20%;
			width: 100rpx;
			height: 100rpx;
			image{
				width: 100%;
				height: 100%;
				display: block;
				border-radius: 10rpx;
			}
			display: block;
			 
		}
		.name {
			 font-size: 24rpx;
			 width: 80%;
			.type {
				display: flex;
				align-items: center;
				justify-content: space-between;
			}
			.types{
				margin-top: 20rpx;
				font-size: 25rpx;
				color: #898989;
			}
			 
		}
	}
</style>